<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
		<title>人民币提现</title>
			<meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no">
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style" />
	<meta content="telephone=no" name="format-detection" />
	<link href="/wap/css/global.css?v=1.0" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="/wap/css/style.css?v=1.2" />
	<link rel="stylesheet" type="text/css" href="/wap/css/swiper3.1.0.min.css?v=1.1" />
	<script type="text/javascript" src="/wap/js/1.7.2.min.js"></script>
	<script src="/wap/js/index.js?v=1.7"></script>
	<script type="text/javascript" src="/wap/js/wvke.js?v=1.1"></script>
	<script type="text/javascript" src="__PUBLIC__/layer/layer.js"></script>
		<script>
		function _size(){
			document.documentElement.style.fontSize = document.documentElement.clientWidth / 10.80 + 'px';
		}
		_size();
		window.onresize = function(){
			_size();
		}
	</script>
</head><body>
<div class="container">
	<!--头部-->
	<div class="head head_white">
		<div class="left">
			<a href="/finance/"  ><img src="/wap/images/login_icon_arrow2.png" class="icon_cha"></a>
		</div>
		<div class="title">人民币提现</div>
		<div class="right">
			<a href="/finance/mytxjl.html"><img src="/wap/images/icon_list.png" class="icon_list"></a>
		</div>
	</div>
	<div class="main">
		<div class="margin_lbian">
			<form id="form" >
				<div class="form_box po_re findpw_tan">
					<i class="form_icon  w_230">银 行 卡</i>
					<div>
						<div class="select_box w_670 left">
						<notempty name="userBankList">
							<select name="type" class="select" id="mytx_type">
									<volist name="userBankList" id="vo">
										<option value="{$vo.id}">{$vo.name}</option>
									</volist>
								</select>
								<else/>
								<a href="/User/bank.html" class="fz_4">请添加提现银行卡</a>
								</notempty>
						</div>
						<a href="/User/bank.html" class="icon_add right"><img src="/wap/images/icon_add.png"> </a>
					</div>
				</div>
				<div class="form_box po_re findpw_tan">
					<i class="form_icon  w_230">提现金额</i>
					<div>
						<div class="input_box po_re left"><input type="text" name="num" id="num" class="input w_430 subMoneyali" placeholder="最小提现金额为￥500"></div>
						<span class="right green fz_4">
							<font style="font-size:12px;">(可用：¥ <em style="font-size:12px;" onClick="$('#num').val({$user_coin['cny']|NumToStr})">{$user_coin['cny']|NumToStr}</em>)</font>
						</span>
					</div>
				</div>
				<!--<div class="form_arrival pl_230 wfull">
					<span class="mr_20">到账:</span>
						<input type="text" id="monet_dz" name="monet_dz" class="input w_570" placeholder="0" disabled>
				</div>-->
				<div class="form_box po_re findpw_tan">
					<i class="form_icon  w_230">交易密码</i>
					<div>
						<div class="input_box po_re w_740"><input type="password" id="paypassword" name="paypassword" class="input" placeholder="请输入交易密码"></div>
					</div>
				</div>
													<tr>
						<div class="form_box po_re findpw_yzm clear ml_230">
							<input type="button" id="regBtn"  onclick="SendCode()" value="短信验证码" class="yzm_sms"/>
						</div>
					</tr>
					<!-- <div class="form_box po_re findpw_tan border_none"> -->
						<!-- <div class="input_box po_re w_740">如果短信发送延迟，请使用语音验证码</div> -->
					<!-- </div> -->
					</tr>
					<div class="form_box po_re findpw_tan">
						<i class="form_icon w_230">手机验证码</i>
						<div>
							<div class="input_box po_re w_740"><input type="text" name="moble_verify" id="moble_verify" class="text"/></div>
						</div>
					</div>
				<div class="form_btn">
					<input type="button" class="btn"  onclick="Update()" name="deposit_next" id="deposit_next" value="确认提现">
				</div>
			</form>
			<div class="withdraw_con border_none">
				<h2 class="fz_4 gfs">提现须知</h2>
				<p>（申请提现后24小时内到账 - 周六周日延迟）如果银行卡和名字错误导致24小时不到账，联系客服处理！</p>
			</div>

		</div>
	</div>

</div>
<script type="text/javascript">
	function subMoneyKeyUp(obj,event) {
		event = event ? event : window.event;
		if(typeof event !='undefined' && (event.keyCode == 37 || event.keyCode == 39)){
			return;
		}
		obj.value=obj.value.replace(/\D	/g,'');
		var cnyTotal = parseFloat(obj.value+$(".random").html());
	}
	$(".subMoneyali").blur(function (e){
		if($(e.relatedTarget).attr('id')=='tfmoney'){
			return ;
		}
		$(this).val() < 500 ? $(this).val(500):'';
		subMoneyKeyUp(this);
	});
	xuetong.sendsms();
	function wm() {
		$.post('/ajax/wm/', $('#form').serialize(), function (d) {
			ajax_islogin(d);
			alert(d.msg);
			if (d.status) location.reload();
		}, 'json');
	}

	
	function SendCode() {


		$('#regBtn').attr("disabled", "disabled");
		$.post("{:U('Verify/mytx')}", {}, function (data) {
			if (data.status == 1) {
				layer.msg(data.info, {
					icon: 1
				});
				var obj = $('#regBtn');
				var wait = 120;
				var interval = setInterval(function () {
					obj.css('backgroundColor', '#999B9C');
					obj.val(wait + '秒再次发送');
					wait--;
					if (wait < 0) {
						clearInterval(interval);
						obj.val('获取验证码');
						$('#regBtn').removeAttr("disabled");
						obj.css('backgroundColor', '#0096e0');
					}
					;
				}, 1000);
			} else {
				layer.msg(data.info, {
					icon: 2
				});
			}
		}, "json");
	}
	function Update() {
		var num = $("#num").val();
		var paypassword = $("#paypassword").val();
		var moble_verify = $("#moble_verify").val();
		var type = $('#mytx_type option:selected').val();
		if (num == "" || num == null) {
		alert('请输入提现金额');
			return false;
		}
		
		if (paypassword == "" || paypassword == null) {
		alert('请输入交易密码');
			return false;
		}
		if (moble_verify == "" || moble_verify == null) {
			alert('请输入短信验证码');
			return false;
		}
		
		$.post("{:U('Finance/mytxUp')}", {
			type: type,
			num: num,
			paypassword: paypassword,
			moble_verify: moble_verify
		}, function (data) {
			if (data.status == 1) {
				alert(data.info);
				window.location = "{:U('Finance/mytxjl')}";
			} else {
			alert(data.info);
				if (data.url) {
					window.location = data.url;
				}
			}
		}, "json");
	}


</script>


</body>
</html>